Skip to content

Instantly share code, notes, and snippets.

@wojteklu
wojteklu / clean_code.md
Last active October 19, 2026 01:31
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@bokub
bokub / 1_Google.md
Last active October 19, 2026 01:29
Free map tiles (with preview)

Free Google Maps tiles

URL: https://{s}.google.com/vt/lyrs={l}&x={x}&y={y}&z={z}

Parameters:

  • Subdomain: mt0, mt1, mt2, mt3
  • Layer:
    • m = standard roadmap
    • r = alternative roadmap
  • h = roads only
@hosamn
hosamn / PS4 PKGs CUSA1-10000.csv
Created November 28, 2022 21:04
PS4 - Single PKG Downloads - CUSA1-10000
We can't make this file beautiful and searchable because it's too large.
Parental Level,Game Title,File Offset,PlayStation PRO Support,Current Version,Instant Download,Package Size,PlayStation VR,Piece,SHA1 Hash,Title ID,Play Together
3,THE PLAYROOM,0,No,1.07,http://gs2.ww.prod.dl.playstation.net/gs2/ppkgo/prod/CUSA00001_00/9/f_ef965b581d35637dabc96366f29f1f0ece58c8fa9158b0eb7de9407ae72272e8/f/IP9100-CUSA00001_00-PLAYROOM00000000-A0107-V0100.pkg,34.9MB,No,0,22774b6c655f47dffce0eb7e15c5e865dce6a849,CUSA00001_00,
9,KILLZONE SHADOW FALL,0,No,1.81,http://gs2.ww.prod.dl.playstation.net/gs2/ppkgo/prod/CUSA00002_00/58/f_0882efa770fbf5b9a03b4decce248e8f07fd9585cbe43c44791799952c62fd14/f/EP9000-CUSA00002_00-KZ4RELEASE000041-A0181-V0100.pkg,2.9GB,No,0,552b7127dac3ee8ab5ce2ae051f6436c3ec605fc,CUSA00002_00,
7,inFAMOUS Second Son,0,Yes,1.07,http://gs2.ww.prod.dl.playstation.net/gs2/ppkgo/prod/CUSA00004_00/28/f_2881c3732328a643917aeb4c1e73b916c1d6baa7ea09e2e81f33d5f139ea9449/f/EP9000-CUSA00004_00-SECONDSONSHIP000-A0107-V0100.pkg,3.7GB,No,0,0538bdff843286013877ab92e5dc936b1407ddcb,CUSA00004_00,
  1. Download and open HxD.
  2. Open the original engine.dll in HxD.
  3. Go to Search -> Replace -> Hex-values.
  4. Search for 8B F1 E8 40 CD 05 00 8B 7D 10 83 F8 02 0F 94 C3.
  5. Replace with 31 C0 E9 2D 01 00 00 90 90 90 90 90 90 90 90 90.
  6. Use File -> Save as... and save it as engine.dll.

Reference: patching sub_1013BF40 result to successfully return always fixes the constant "No Steam logon\n" error. Meant for Portal Reloaded.

Python usage: python3 patch.py engine.dll

@tidoust
tidoust / w3c-process-modularization.user.js
Last active October 19, 2026 01:03
Draft W3C Process Document modularization menu
// ==UserScript==
// @name Draft W3C Process Document modularization menu
// @description This adds a menu to modularize the Editor's Draft of the W3C Process Document as discussed in https://github.com/w3c/process/issues/1188
// @namespace https://tidoust.net/
// @version 1.0.1
// @match https://www.w3.org/policies/process/drafts/*
// @grant none
// ==/UserScript==
@knowlet
knowlet / crossover.sh
Created March 11, 2025 06:51
Unlimited CrossOver Trial (macOS)
echo "🧹 Resetting CrossOver bottles..."
pkill CrossOver && echo "✅ CrossOver processes killed."
echo "🕒 Modifying trial timestamps..."
DATETIME=$(date -u -v -3H '+%Y-%m-%dT%TZ')
echo "✅ New trial date set to: ${DATETIME}"
defaults write com.codeweavers.CrossOver FirstRunDate -date "${DATETIME}"
defaults write com.codeweavers.CrossOver SULastCheckTime -date "${DATETIME}"
echo "✅ Updated trial timestamps in preferences."
echo "🧹 Resetting CrossOver bottles..."
find ~/Library/Application\ Support/CrossOver/Bottles/ -type f \( -name ".eval" -o -name ".update-timestamp" \) -exec rm -f "{}" +
@nikoheikkila
nikoheikkila / README.md
Last active October 19, 2026 00:47
Fish Shell function for sourcing standard .env files

envsource

⚠️ NOTE (20.5.2023): I don't really use this function at all anymore since there are now tools such as Taskfile, which reads the .env file for me sparing me the need to pollute my session with environment variables.


I've been using Fish shell for years which is great and all, but one thing that has got me frustrated is using it with .env files.

When attempting to run source .env in a project, I usually encounter this problem:

@axeltechtips
axeltechtips / readme.md
Last active September 13, 2026 14:08
Windows Media Center (Modern Hardware) (8.1/10/11)

Download the Installer: Visit the GitHub repository provided in the link: https://github.com/garyan2/wmcsetup/releases/latest/download/wmcsetup-x64.msi and download the installer file wmcsetup-x64.msi to your computer.

Run the Installer: Once the download is complete, locate the downloaded file (wmcsetup-x64.msi) on your computer and double-click it to run the installer.

Install Windows Media Center: Follow the on-screen instructions provided by the installer to install Windows Media Center on your system. You may need to accept license agreements and choose installation options during this process. Make sure to review the options carefully before proceeding.

Complete the Installation:

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@unrays
unrays / first-avx-experiment.hpp
Created October 19, 2026 00:26
My first hands-on experiment with AVX intrinsics and SIMD vector addition in C++.
// Copyright (c) October 2026 Félix-Olivier Dumas. All rights reserved.
// Licensed under the terms described in the LICENSE file
#include <iostream>
#include <immintrin.h>
int main() {
float a[8] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
float b[8] = { 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, 80.0f };